#ifndef _TC_CHESSBOARD
#define _TC_CHESSBOARD

#include <tcCommon/tc_common.h>
#include <tcCommon/tc_math.h>

#ifdef __cplusplus
extern "C" 
{
#endif

#define TC_LATTICE_WIDTH	30
#define TC_LATTICE_HEIGHT	40

#define TC_CHESSBOARD_WIDTH	 250
#define TC_CHESSBOARD_HEIGHT 370

#define TC_CHESSMEN_MAX_NUMBER 32
#define TC_CHESSMAN_NULL -1

enum 
{
	TC_CHESSMAN_SIZE_LARGE = 0,
	TC_CHESSMAN_SIZE_MIDDLE = 1,
	TC_CHESSMAN_SIZE_SMALL = 2,
};

typedef struct
{
	tcType init_size;
	tcType init_owner;
} tc_chessman_init_desc;

tcExport BOOL tc_database_init();
tcExport void tc_database_exit();

tcExport int tc_chessman_create(const tc_chessman_init_desc *desc);
tcExport void tc_chessman_reset(int id);

tcExport tcType tc_chessman_get_owner(int id);

tcExport tcType tc_chessman_get_size(int id);

tcExport int tc_chessman_get_value(int id);

tcExport void tc_chessman_set_dead(int id, BOOL dead);
tcExport BOOL tc_chessman_get_dead(int id);

tcExport void tc_chessman_change(int id);
tcExport BOOL tc_chessman_enlarge(int id);


#ifdef __cplusplus
}
#endif

#endif